package entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * The type Role.
 */
public class Role extends Common implements Serializable {
    private static final long serialVersionUID = 324125020294661055L;
    @TableId(type = IdType.ID_WORKER_STR)
    private String id;

    /**
     * 角色名称
     */
    @TableField(value = "roleName")
    private String roleName;

    private String description;

    /**
     * To string string.
     *
     * @return the string
     */
    @Override
    public String toString() {
        return "Role{" +
                "id='" + id + '\'' +
                ", roleName='" + roleName + '\'' +
                ", description='" + description + '\'' +
                ", forwordList=" + forwordList +
                ", powers=" + powers +
                '}';
    }

    public List<String> getForwordList() {
        return forwordList;
    }

    public void setForwordList(List<String> forwordList) {
        this.forwordList = forwordList;
    }

    private List<String> forwordList;

    /**
     * Gets description.
     *
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets description.
     *
     * @param description the description
     */
    public void setDescription(String description) {
        this.description = description;
    }

    @TableField(exist = false)
    private List<Power> powers;

    /**
     * Gets id.
     *
     * @return the id
     * @author overlook
     * @date 2022 -04-16 20:31:57
     */
    public String getId() {
        return id;
    }

    /**
     * Sets id.
     *
     * @param id the id
     * @author overlook
     * @date 2022 -04-16 20:31:57
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * Gets role name.
     *
     * @return the role name
     * @author overlook
     * @date 2022 -04-16 20:31:57
     */
    public String getRoleName() {
        return roleName;
    }

    /**
     * Sets role name.
     *
     * @param roleName the role name
     * @author overlook
     * @date 2022 -04-16 20:31:57
     */
    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    /**
     * Gets powers.
     *
     * @return the powers
     * @author overlook
     * @date 2022 -04-16 20:31:57
     */
    public List<Power> getPowers() {
        return powers;
    }

    /**
     * Sets powers.
     *
     * @param powers the powers
     * @author overlook
     * @date 2022 -04-16 20:31:57
     */
    public void setPowers(List<Power> powers) {
        this.powers = powers;
    }

    /**
     * Instantiates a new Role.
     *
     * @param createUser  the create user
     * @param createTime  the create time
     * @param updateUser  the update user
     * @param updateTime  the update time
     * @param id          the id
     * @param roleName    the role name
     * @param description the description
     * @param powers      the powers
     */
    public Role(String createUser, Date createTime, String updateUser, Date updateTime, String id, String roleName, String description, List<Power> powers) {
        super(createUser, createTime, updateUser, updateTime);
        this.id = id;
        this.roleName = roleName;
        this.description = description;
        this.powers = powers;
    }

    /**
     * Instantiates a new Role.
     *
     * @author overlook
     * @date 2022 -04-16 20:31:57
     */
    public Role() {
    }
}

